\(\int \frac {a+b \arctan (c+d x)}{(c e+d e x)^2} \, dx\) [5]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 61 \[ \int \frac {a+b \arctan (c+d x)}{(c e+d e x)^2} \, dx=-\frac {a+b \arctan (c+d x)}{d e^2 (c+d x)}+\frac {b \log (c+d x)}{d e^2}-\frac {b \log \left (1+(c+d x)^2\right )}{2 d e^2} \]

[Out]

(-a-b*arctan(d*x+c))/d/e^2/(d*x+c)+b*ln(d*x+c)/d/e^2-1/2*b*ln(1+(d*x+c)^2)/d/e^2

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5151, 12, 4946, 272, 36, 29, 31} \[ \int \frac {a+b \arctan (c+d x)}{(c e+d e x)^2} \, dx=-\frac {a+b \arctan (c+d x)}{d e^2 (c+d x)}+\frac {b \log (c+d x)}{d e^2}-\frac {b \log \left ((c+d x)^2+1\right )}{2 d e^2} \]

[In]

Int[(a + b*ArcTan[c + d*x])/(c*e + d*e*x)^2,x]

[Out]

-((a + b*ArcTan[c + d*x])/(d*e^2*(c + d*x))) + (b*Log[c + d*x])/(d*e^2) - (b*Log[1 + (c + d*x)^2])/(2*d*e^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 5151

Int[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d, Subst[I
nt[(f*(x/d))^m*(a + b*ArcTan[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[d*e - c*f, 0
] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {a+b \arctan (x)}{e^2 x^2} \, dx,x,c+d x\right )}{d} \\ & = \frac {\text {Subst}\left (\int \frac {a+b \arctan (x)}{x^2} \, dx,x,c+d x\right )}{d e^2} \\ & = -\frac {a+b \arctan (c+d x)}{d e^2 (c+d x)}+\frac {b \text {Subst}\left (\int \frac {1}{x \left (1+x^2\right )} \, dx,x,c+d x\right )}{d e^2} \\ & = -\frac {a+b \arctan (c+d x)}{d e^2 (c+d x)}+\frac {b \text {Subst}\left (\int \frac {1}{x (1+x)} \, dx,x,(c+d x)^2\right )}{2 d e^2} \\ & = -\frac {a+b \arctan (c+d x)}{d e^2 (c+d x)}+\frac {b \text {Subst}\left (\int \frac {1}{x} \, dx,x,(c+d x)^2\right )}{2 d e^2}-\frac {b \text {Subst}\left (\int \frac {1}{1+x} \, dx,x,(c+d x)^2\right )}{2 d e^2} \\ & = -\frac {a+b \arctan (c+d x)}{d e^2 (c+d x)}+\frac {b \log (c+d x)}{d e^2}-\frac {b \log \left (1+(c+d x)^2\right )}{2 d e^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.85 \[ \int \frac {a+b \arctan (c+d x)}{(c e+d e x)^2} \, dx=\frac {\frac {-a-b \arctan (c+d x)}{c+d x}+b \left (\log (c+d x)-\frac {1}{2} \log \left (1+(c+d x)^2\right )\right )}{d e^2} \]

[In]

Integrate[(a + b*ArcTan[c + d*x])/(c*e + d*e*x)^2,x]

[Out]

((-a - b*ArcTan[c + d*x])/(c + d*x) + b*(Log[c + d*x] - Log[1 + (c + d*x)^2]/2))/(d*e^2)

Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.95

method result size
derivativedivides \(\frac {-\frac {a}{e^{2} \left (d x +c \right )}+\frac {b \left (-\frac {\arctan \left (d x +c \right )}{d x +c}+\ln \left (d x +c \right )-\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{e^{2}}}{d}\) \(58\)
default \(\frac {-\frac {a}{e^{2} \left (d x +c \right )}+\frac {b \left (-\frac {\arctan \left (d x +c \right )}{d x +c}+\ln \left (d x +c \right )-\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{e^{2}}}{d}\) \(58\)
parts \(-\frac {a}{d \,e^{2} \left (d x +c \right )}+\frac {b \left (-\frac {\arctan \left (d x +c \right )}{d x +c}+\ln \left (d x +c \right )-\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{e^{2} d}\) \(60\)
parallelrisch \(\frac {6 \ln \left (d x +c \right ) x b c \,d^{2}-3 \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) x b c \,d^{2}+6 \ln \left (d x +c \right ) b \,c^{2} d -3 \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b \,c^{2} d +2 x a \,d^{2}-6 b \arctan \left (d x +c \right ) c d -4 a c d}{6 \left (d x +c \right ) c \,d^{2} e^{2}}\) \(121\)
risch \(\frac {i b \ln \left (1+i \left (d x +c \right )\right )}{2 d \,e^{2} \left (d x +c \right )}-\frac {-2 \ln \left (-d x -c \right ) b d x +\ln \left (-d^{2} x^{2}-2 c d x -c^{2}-1\right ) b d x -2 \ln \left (-d x -c \right ) b c +\ln \left (-d^{2} x^{2}-2 c d x -c^{2}-1\right ) b c +i b \ln \left (1-i \left (d x +c \right )\right )+2 a}{2 e^{2} \left (d x +c \right ) d}\) \(140\)

[In]

int((a+b*arctan(d*x+c))/(d*e*x+c*e)^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(-a/e^2/(d*x+c)+b/e^2*(-1/(d*x+c)*arctan(d*x+c)+ln(d*x+c)-1/2*ln(1+(d*x+c)^2)))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.23 \[ \int \frac {a+b \arctan (c+d x)}{(c e+d e x)^2} \, dx=-\frac {2 \, b \arctan \left (d x + c\right ) + {\left (b d x + b c\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right ) - 2 \, {\left (b d x + b c\right )} \log \left (d x + c\right ) + 2 \, a}{2 \, {\left (d^{2} e^{2} x + c d e^{2}\right )}} \]

[In]

integrate((a+b*arctan(d*x+c))/(d*e*x+c*e)^2,x, algorithm="fricas")

[Out]

-1/2*(2*b*arctan(d*x + c) + (b*d*x + b*c)*log(d^2*x^2 + 2*c*d*x + c^2 + 1) - 2*(b*d*x + b*c)*log(d*x + c) + 2*
a)/(d^2*e^2*x + c*d*e^2)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 12.22 (sec) , antiderivative size = 223, normalized size of antiderivative = 3.66 \[ \int \frac {a+b \arctan (c+d x)}{(c e+d e x)^2} \, dx=\begin {cases} - \frac {a}{c d e^{2} + d^{2} e^{2} x} + \frac {b c \log {\left (\frac {c}{d} + x \right )}}{c d e^{2} + d^{2} e^{2} x} - \frac {b c \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{c d e^{2} + d^{2} e^{2} x} + \frac {i b c \operatorname {atan}{\left (c + d x \right )}}{c d e^{2} + d^{2} e^{2} x} + \frac {b d x \log {\left (\frac {c}{d} + x \right )}}{c d e^{2} + d^{2} e^{2} x} - \frac {b d x \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{c d e^{2} + d^{2} e^{2} x} + \frac {i b d x \operatorname {atan}{\left (c + d x \right )}}{c d e^{2} + d^{2} e^{2} x} - \frac {b \operatorname {atan}{\left (c + d x \right )}}{c d e^{2} + d^{2} e^{2} x} & \text {for}\: d \neq 0 \\\frac {x \left (a + b \operatorname {atan}{\left (c \right )}\right )}{c^{2} e^{2}} & \text {otherwise} \end {cases} \]

[In]

integrate((a+b*atan(d*x+c))/(d*e*x+c*e)**2,x)

[Out]

Piecewise((-a/(c*d*e**2 + d**2*e**2*x) + b*c*log(c/d + x)/(c*d*e**2 + d**2*e**2*x) - b*c*log(c/d + x - I/d)/(c
*d*e**2 + d**2*e**2*x) + I*b*c*atan(c + d*x)/(c*d*e**2 + d**2*e**2*x) + b*d*x*log(c/d + x)/(c*d*e**2 + d**2*e*
*2*x) - b*d*x*log(c/d + x - I/d)/(c*d*e**2 + d**2*e**2*x) + I*b*d*x*atan(c + d*x)/(c*d*e**2 + d**2*e**2*x) - b
*atan(c + d*x)/(c*d*e**2 + d**2*e**2*x), Ne(d, 0)), (x*(a + b*atan(c))/(c**2*e**2), True))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.51 \[ \int \frac {a+b \arctan (c+d x)}{(c e+d e x)^2} \, dx=-\frac {1}{2} \, {\left (d {\left (\frac {\log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{2} e^{2}} - \frac {2 \, \log \left (d x + c\right )}{d^{2} e^{2}}\right )} + \frac {2 \, \arctan \left (d x + c\right )}{d^{2} e^{2} x + c d e^{2}}\right )} b - \frac {a}{d^{2} e^{2} x + c d e^{2}} \]

[In]

integrate((a+b*arctan(d*x+c))/(d*e*x+c*e)^2,x, algorithm="maxima")

[Out]

-1/2*(d*(log(d^2*x^2 + 2*c*d*x + c^2 + 1)/(d^2*e^2) - 2*log(d*x + c)/(d^2*e^2)) + 2*arctan(d*x + c)/(d^2*e^2*x
 + c*d*e^2))*b - a/(d^2*e^2*x + c*d*e^2)

Giac [F]

\[ \int \frac {a+b \arctan (c+d x)}{(c e+d e x)^2} \, dx=\int { \frac {b \arctan \left (d x + c\right ) + a}{{\left (d e x + c e\right )}^{2}} \,d x } \]

[In]

integrate((a+b*arctan(d*x+c))/(d*e*x+c*e)^2,x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.75 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.44 \[ \int \frac {a+b \arctan (c+d x)}{(c e+d e x)^2} \, dx=\frac {b\,\ln \left (c+d\,x\right )}{d\,e^2}-\frac {b\,\mathrm {atan}\left (c+d\,x\right )}{x\,d^2\,e^2+c\,d\,e^2}-\frac {b\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{2\,d\,e^2}-\frac {a}{x\,d^2\,e^2+c\,d\,e^2} \]

[In]

int((a + b*atan(c + d*x))/(c*e + d*e*x)^2,x)

[Out]

(b*log(c + d*x))/(d*e^2) - (b*atan(c + d*x))/(d^2*e^2*x + c*d*e^2) - (b*log(c^2 + d^2*x^2 + 2*c*d*x + 1))/(2*d
*e^2) - a/(d^2*e^2*x + c*d*e^2)